<!-- Page container -->
<div class="container">
	<p class="text-center">
		{{HTML::image('img/logo.png', 'Logo')}}<br><br>
		@if(Session::has('message'))
			<span style='color: red; font-weight: bold;'>{{Session::get('message')}}</span>
		@else
			{{trans('form.welcomelogin')}}
		@endif
	</p>
	<div class="login-buttons">
		<button class="btn btn-login" data-toggle="modal" data-target="#loginModal">{{trans('form.login')}}</button>
		<!--<strong>or</strong>
		<button class="btn btn-login" data-toggle="modal" data-target="#signUpModal">{{trans('form.sign up')}}</button>-->
	</div>
</div>
<!-- /Page container -->

<!-- Login modal -->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModal" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">{{trans('form.pleaselogin')}}</h4>
			</div>
			<div class="modal-body">
				{{Form::open(array('method' => 'post', 'url' => 'admin/login/login', 'role' => 'form', 'id' => 'form-login'))}}
					<div class="form-group">
						<input type="email" name='email' class="form-control" placeholder="{{trans('user.email')}}" required autofocus>
					</div>
					<div class="form-group">
						<input type="password" name='password' class="form-control" placeholder="{{trans('user.password')}}" required>
					</div>
					<!--<label class="checkbox">
						<input type="checkbox" value="remember-me"> {{trans('form.rememberme')}}
					</label>-->
				{{Form::close()}}
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">{{trans('form.cancel')}}</button>
				<button type="button" id="login" class="btn btn-primary">{{trans('form.login')}}</button>
			</div>
		</div>
	</div>
</div>

<!-- Sign up modal -->
<div class="modal fade" id="signUpModal" tabindex="-1" role="dialog" aria-labelledby="signUpModal" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">{{trans('form.sign up')}}</h4>
			</div>
			<div class="modal-body">
				{{Form::open(array('method' => 'post', 'url' => 'admin/login/login', 'role' => 'form'))}}
					<div class="form-group">
						<input type="email" class="form-control" placeholder="Username" required autofocus>
					</div>
					<div class="form-group">
						<input type="email" class="form-control" placeholder="Email address" required autofocus>
					</div>
					<div class="form-group">
						<input type="password" class="form-control" placeholder="Password" required>
					</div>
					<div class="form-group">
						<input type="password" class="form-control" placeholder="Repeat password" required>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">{{trans('form.cancel')}}</button>
				<button type="button" class="btn btn-primary">{{trans('form.sign up')}}</button>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
$(document).ready(function() {
	$("button#login").click(function(event) {
		/* Act on the event */
		$("form#form-login").submit();
	});
});
</script>